home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / Amiga_Mail_Vol2 / Archives / Plain / mj92 / A570 / A570.txt < prev   
Encoding:
Text File  |  1992-05-27  |  18.0 KB  |  429 lines

  1. (c)  Copyright 1992 Commodore-Amiga, Inc.   All rights reserved.
  2. The information contained herein is subject to change without notice,
  3. and is provided "as is" without warranty of any kind, either expressed
  4. or implied.  The entire risk as to the use of this information is
  5. assumed by the user.
  6.  
  7.  
  8. Making CDTV Titles That Work on Amigas
  9.  
  10.  
  11. by Ben Phister, CATS
  12.  
  13.  
  14. In the coming months Commodore plans to begin delivery of the A570
  15. drive.  This CD-ROM peripheral for the Amiga 500 and Amiga 500 Plus
  16. should rapidly expand the installed base of CDTV-compatible players.
  17. With over 3 million Amigas sold worldwide, the potential for the A570
  18. is enormous.
  19.  
  20. The A570 presents exciting opportunities for CDTV developers.  It also
  21. presents a certain number of challenges.  Great efforts have been made
  22. to ensure compatibility of titles for both platforms.  However, there
  23. are numerous differences between the CDTV and the A570: keyboard plus
  24. mouse vs. remote control, TV sets in a living room vs. RGB monitors on
  25. a desktop, Kickstart 2.04 vs. Kickstart 1.3, etc.
  26.  
  27. With the availability of the optional keyboard for CDTV players, many
  28. users now attach a keyboard to their CDTV.  Other users have attached
  29. CD-ROM peripherals to their Amiga 2000 or A3000 computers, and need
  30. keyboard support from titles.
  31.  
  32. To ensure strong sales of your title on all the systems capable of
  33. playing CDTV discs, your title should take advantage of the new
  34. features of the A570, yet remain easy-to-use on the CDTV player.  This
  35. article discusses the differences between the two systems, and presents
  36. extensions to the CDTV User Interface Guidelines to allow titles to run
  37. on both platforms.
  38.  
  39.  
  40. Physical Differences
  41.  
  42. The A570 does not include the following items found on the CDTV player:
  43.  
  44. o Infrared remote control.
  45. o Audio CD control buttons (Play, FF, etc.).
  46. o Fluorescent display.
  47. o Personal RAM Card slot.
  48. o RF or composite video output to TV or VCR.
  49. o MIDI ports.
  50.  
  51. Of course, functional equivalents of most of these items are already a
  52. part of the Amiga 500; many others are available as options. Although
  53. the Amiga lacks the standard CDTV resources above, the Amiga connected
  54. to the A570 provides resources not available on all CDTVs.  Every title
  55. running on an A570 will have access to a floppy disk drive and a
  56. keyboard.  CDTV titles should support saving to a floppy, along with
  57. saving to a personal RAM card.
  58.  
  59.  
  60. Operating System Issues
  61.  
  62. Kickstart 1.3 vs.  2.04
  63.  
  64. The A570 connects to either an A500 running Kickstart 1.3 or 2.04, or
  65. an A500 Plus running Kickstart 2.04.  It is imperative that your
  66. application work in both these environments.  The A570 uses the
  67. Kickstart ROM routines found in the host computer.  It contains its own
  68. ROMs which provide the CDTV-specific functions (cdtv.device,
  69. playerprefs.library, Audio control panel, CDTV Preferences, etc.)
  70.  
  71.  
  72. What Am I Running On?
  73.  
  74. It is possible for applications to detect if they are running on an
  75. A570 or on a CDTV player.  There is an A570-specific module called
  76. "A690ID".  A title can test to see if this module is present using the
  77. exec.library function FindResident().  If the "A690ID" module is
  78. present, the title is running on an A570-equipped A500.
  79.  
  80.  
  81. Memory
  82.  
  83. An Amiga with an A570 may have various amounts of RAM.  In a CDTV the
  84. minimum memory configuration is 1 Mbyte of Chip RAM.  Do not assume
  85. that all systems have the same memory configuration.  Some users might
  86. try to run your application on an Amiga + A570 with only 512K of Chip
  87. RAM and no Fast RAM.  Others may have a 512K Chip/512K Fast RAM system.
  88. To avoid crashing due to memory shortages, check the amount of memory
  89. available when your application begins execution.  If not enough memory
  90. is available, you should display a message to that effect and stop
  91. operating rather than crashing the machine.
  92.  
  93. Others may have more than 1 Mbyte of RAM: either Fast or Chip memory.
  94. Your title should also work properly under these conditions.
  95.  
  96.  
  97. Emulating the Remote Controller
  98.  
  99. One of the major differences between the A570 and the CDTV is the
  100. remote controller.  The Amiga's keyboard, the mouse, and, optionally,
  101. the joystick replace the remote controller.  Your title must take these
  102. differences into account, and your input handling routines may require
  103. modification.  The following section will discuss these differences,
  104. and make additions to the CDTV User Interface Guidelines.
  105.  
  106. Here is a chart describing how Amiga keyboard and mouse actions should
  107. correspond to the CDTV player's remote controller buttons.
  108.  
  109.  
  110. CDTV Remote Controller Emulation
  111.  
  112. Cursor Buttons
  113.  
  114. An application that runs on an A570 can emulate the four directional
  115. arrow buttons on the CDTV remote control using two methods: via mouse
  116. movements and via the four directional arrows next to the numeric
  117. keypad.  Titles should support both methods of cursor control.  Jumping
  118. highlights are easy to control using the arrow keys.  If the title has
  119. a pointer, the user should be able to move it using the mouse, but, in
  120. case the user doesn't have a mouse, titles should also allow the user
  121. to move the pointer with the arrow keys.
  122.  
  123.  
  124. The 'A' and 'B' Buttons
  125.  
  126. The A and B buttons on the remote correspond to the left and right
  127. buttons on the mouse.  If the user prefers to use a keyboard for input,
  128. he can use any of the following:
  129.  
  130. The left Alt/left Amiga combination for the 'A' button and right
  131. Alt/right Amiga for the 'B' button.
  132.  
  133. The left Amiga key (raw keycode 66 hex) alone for 'A', and right Amiga
  134. key (raw keycode 67 hex) alone for 'B'.
  135.  
  136. The F9 function key (rawkey code 58 hex) for 'A' and F10 function key
  137. (rawkey code 59 hex) for 'B'.
  138.  
  139. the A (for left) and B (for right) keys on the keyboard.
  140.  
  141.  
  142. By offering a keyboard equivalent to the 'A' and 'B' button, users with
  143. keyboards will not have to move their hands from the keyboard to the
  144. mouse in order to confirm a selection.  It also avoids accidental
  145. movements of the mouse when pressing the rodent's left or right button.
  146.  
  147. The F9 and F10 function keys were selected because of their convenient
  148. location near the directional arrow keys on the keyboard.
  149.  
  150. Supporting the 'A' and 'B' keys on the keyboard is more complicated.
  151. The 'A' or 'B' key on the keyboard cannot be equivalents for the
  152. remote's A and B buttons during the input of a text string.  In other
  153. situations, however, this mapping can be helpful to the neophyte user.
  154.  
  155. If a title uses the console device, it should support both uppercase
  156. and lowercase ('A' and 'a').  Furthermore, the raw keycodes for the 'A'
  157. and 'B' keys must always be translated via the active keymap to
  158. determine the actual ASCII value.  The rawkeyconvert.c routines in the
  159. ROM Kernel manual give an example of this translation process.
  160.  
  161. If your title reads raw keycodes directly, beware of using raw keycodes
  162. for the 'A' and 'B' keys on the keyboard, as the raw keycodes may
  163. change if the user has a French keyboard.  The French keyboard has
  164. reversed the position of the 'A' and the 'Q' keys.  If you choose to
  165. have raw keycode support, you should accept both the 'A' (raw keycode
  166. 20 hex) and 'Q' (raw keycode 10 hex) for the 'A' button, and 'B' (raw
  167. keycode 35 hex) for the 'B' button.
  168.  
  169.  
  170. 0-9 Buttons
  171.  
  172. The 0-9 and ENTER buttons located in the center of the remote are
  173. replaced by the Amiga keyboard's numeric keypad.  The keycodes of the
  174. remote represent those found on the keypad, the only difference being
  175. the reversed physical layout of the keys:
  176.  
  177.                 Remote              Numeric keypad
  178.  
  179.                 1 2 3                   7 8 9
  180.                 4 5 6 0                 4 5 6
  181.                 7 8 9                   1 2 3
  182.                                           0
  183.  
  184.  
  185. Your code will probably not have to be modified to take this into
  186. account, unless it displays 9 icons in a grid pattern, and wants the
  187. user to type in a number corresponding to a certain position.  If you
  188. support a jumping highlight (as suggested in the CDTV User Interface
  189. Guidelines), this should not be a problem.
  190.  
  191. Your code should also support the 10 numeric keys on top of the
  192. alphanumeric keyboard (just below the function keys) for input of
  193. numbers.
  194.  
  195.  
  196.  
  197. Escape Key
  198.  
  199. The ESCAPE key requires special attention with a keyboard.  On the CDTV
  200. remote control, the ESCAPE key generates the ESCAPE rawkey code of 45
  201. hex, the same code as on the A500's keyboard.  The CDTV User Interface
  202. Guidelines recommend that titles use the ESCAPE button as a HELP key.
  203.  
  204.  
  205. Help Key
  206.  
  207. The A500 keyboard has a Help key, rawkey code 5F.  To run effectively
  208. on both the CDTV and A500 with an A570, applications should support
  209. both the Escape key and the Help key to obtain Help functions.  If an
  210. application detects that the user has pressed either the Help key or
  211. the Escape key on the Amiga keyboard, the application should provide a
  212. help function to the user.
  213.  
  214.  
  215. REW, PLAY, PAUSE, FF, STOP
  216.  
  217. These keys are mapped by the A570 ROM to the F1 through F5 keys on the
  218. Amiga keyboard.  The Audio Control Panel uses these equivalents to play
  219. CD audio discs.  If a title detects a keypress on F1 through F5, it
  220. should react as if the user had pressed the corresponding remote
  221. control button.
  222.  
  223. Certain titles ported from the Amiga to the CDTV may have already
  224. established alternate uses of the F1 through F5 keys on the keyboard.
  225. Any such application that retains its mapping of the F1 through F5 keys
  226. for its A570 version should clearly document these alternate key
  227. mappings in its manual.
  228.  
  229.  
  230. Genlock
  231.  
  232. The Genlock button on the CDTV remote is for mode selection of an
  233. optional video genlock device that can be installed in the CDTV.  This
  234. button has no equivalent on the A570.  If you want to support this
  235. feature in an application running on an A570, you cannot be sure that
  236. the genlock used with the Amiga supports software control of mode
  237. switching.  Again, mention this fact in the user manual.
  238.  
  239.  
  240. CD/TV
  241.  
  242. This button on the CDTV remote controller determines whether the
  243. TV/monitor displays input from the CDTV or from the broadcast (or
  244. cable) TV source.  This button has no equivalent on the A570.  If the
  245. user has his Amiga connected to a TV set, his existing cabling handles
  246. this switch-over.
  247.  
  248.  
  249. JOY/MOUSE
  250.  
  251. This button on the remote determines whether the remote's cursor
  252. buttons respond as a joystick or as a mouse.  This is not necessary on
  253. the Amiga + A570: to enter joystick mode, the user simply plugs a
  254. joystick into the Amiga.  To enter mouse mode, he uses his mouse.
  255.  
  256. Some CDTV applications only support one mode or the other.  Titles
  257. should support both modes, if possible.  If a title only supports
  258. joystick mode and the title cannot be reasonably controlled from the
  259. keyboard, you should indicate this on your packaging, as an Amiga +
  260. A570 user might not have a joystick. Screen Design Issues
  261.  
  262. The typical CDTV user is sitting approximately 3 meters from his TV
  263. set.  The typical A570 user will be sitting less than one meter from an
  264. RGB monitor.  These differences require some foresight on the part of
  265. your application.
  266.  
  267.  
  268. Fonts
  269.  
  270. For CDTV usage, a typical font should be no less than 18 points high.
  271. This permits the user to easily view text from a distance.  An A570
  272. user might prefer a smaller font in order to have more text on the
  273. screen, especially when using text-based applications.  In this case,
  274. an application should offer a selection of at least 2 different-sized
  275. fonts to the user.
  276.  
  277.  
  278. Three Levels of Support for the A570
  279.  
  280. Full support for the A570 implies numerous constraints for the CDTV
  281. developer.  He has to worry about supporting a keyboard, working with
  282. different versions of the operating system, dealing with varying memory
  283. configurations and working around differences between Amiga and CDTV
  284. displays.  The issues of starting, exiting, and multitasking titles
  285. remain.
  286.  
  287. There are several Amiga/CDTV configurations that may be booted into a
  288. CLI or Workbench environment: Amiga + A570, any Amiga computer equipped
  289. with a CD-ROM, and a CDTV player with a floppy or hard disk attached.
  290. In these cases, the user may want to launch a CDTV title from that
  291. environment.  If he does so, he will expect the title to exit cleanly,
  292. release all memory, remove any special assigns that may have been
  293. executed, etc.
  294.  
  295. Users may even want to multitask a title.  Most Amiga applications may
  296. be multitasked, and the user may well expect the same from a CDTV
  297. title.  Reference titles would be significantly enhanced if they
  298. supported cutting-and-pasting directly into another application like a
  299. word processor.  Those developing dictionary and encyclopedia titles
  300. may want to provide access methods for users or other applications to
  301. search on a key word.  Some may even want to add an ARexx port.
  302.  
  303. These issues, while reasonable requests from a user, add significant
  304. new burdens to the developer.  Many CDTV titles are designed to take
  305. over the machine.  Many of these titles require all the memory
  306. available in the system (and even more, in some cases).  They often
  307. make special assigns for fonts, data, etc.  Many include no clean-up
  308. code.
  309.  
  310. Full compliance to AmigaDOS standards may be unreasonable for some
  311. titles.  To address this problem, we have established three levels of
  312. compatibility for CDTV titles running on Amigas: Minimal Support,
  313. Support For Workbench Startup and Exit, and Full Multitasking Support.
  314.  
  315.  
  316.  
  317. Level One-Minimal Support
  318.  
  319. An application that meets Level One support requires only a few
  320. enhancements from a standard CDTV-only title.
  321.  
  322. 1) Supports input from the keyboard and the mouse.
  323.  
  324. 2) Runs under both Release 1.3 and Release 2 of the operating system
  325. (which is expected of all CDTV titles).
  326.  
  327. 3) Includes a way for the user to start the title from a CLI and the
  328. Workbench.  Such a title may reboot the system when it starts up.  It
  329. may take over the entire system, refuse to multitask with other
  330. programs, have no cleanup code, and never exit.
  331.  
  332. Commodore has developed a standard icon and associated code, called
  333. BootCD, which developers may include on their CDTV disc.  This icon
  334. will appear from the Workbench.  If the user double-clicks it, a
  335. message will appear telling the user to remove any floppy disks from
  336. the drive, and warning that pressing the Continue gadget will reboot
  337. the system.  If the user continues, BootCD will reset the system, and
  338. the system will then boot directly from your title on CD-ROM.
  339.  
  340.  
  341. Level Two-Support For Workbench Startup and Exit
  342.  
  343. This level provides the user with a way to run CDTV applications
  344. without rebooting the system.  A Level Two compliant title will also
  345. return cleanly to the Workbench or the CLI when it is finished.  This
  346. stage requires that a title:
  347.  
  348. 1) Supports input from the keyboard and the mouse.
  349.  
  350. 2) Runs under both Release 1.3 and Release 2.0 of the operating system.
  351.  
  352. 3) Launches from either the Workbench (via an icon) or the CLI.
  353.  
  354. 4) Manages any resources it allocates.
  355.  
  356. 5) Safely and Cleanly aborts in case any resource allocation fails.
  357.  
  358. 6) Cleans up properly upon exit, closing all libraries and devices, and
  359. returning all memory.
  360.  
  361. 7) Remembers the environment from which the user launched the title.
  362. If the user started the title from a CLI or Workbench, the title must
  363. be able to restore that environment cleanly.  If the title was booted
  364. directly from the CD-ROM, before exiting, the title should take
  365. precautions against leaving the system in an unusable environment.  For
  366. example, if a title makes all of the Workbench colors black using the
  367. devs:system-configuration file, the user should not be allowed to
  368. return to the CLI or Workbench, as the user will only see a black
  369. screen.
  370.  
  371. In level two compatible titles, temporary assigns are acceptable.  The
  372. application may assign system directories (such as fonts:, sys:, etc.)
  373. to the CD during startup.  If it does so the title must restore any of
  374. the assigns it reassigned.
  375.  
  376. A simple way to launch a title from a Workbench icon is using the IconX
  377. utility.  This allows you to create a script that the system executes
  378. when the user clicks on the program icon.  This script may contain any
  379. assigns that a title requires.
  380.  
  381. An easy way a title can tell if the user booted directly from the
  382. CD-ROM is checking for special command line arguments.  Imagine your
  383. title is called ``MyApp''.  When the user boots the system from the
  384. CD-ROM, the startup-sequence launches the application by using a
  385. special command line, for example: ``MyApp ss''.  The ``ss'' tells the
  386. title that the system was booted from the CD-ROM.  If the user starts
  387. the application from the CLI, he would simply type ``MyApp''.  A title
  388. might even utilize another special command line option to tell if it
  389. was launched from an IconX script (i.e. ``MyApp iconx'').  Using this
  390. method a title can detect how the user started it and can choose an
  391. appropriate exit plan.
  392.  
  393.  
  394. Level Three-Full Multitasking Support
  395.  
  396. A title conforming to Level Three support allows users to multitask
  397. freely (given sufficient memory).  These titles must include support
  398. for points 1) through 7) above.  Furthermore, Level Three titles may
  399. not re-assign any directory assigns that the system requires (i.e.
  400. fonts:, sys:, s:, etc.).
  401.  
  402. If a title in this category needs to access a particular font on the
  403. CD-ROM, it should not re-assign fonts: to cd0:fonts.  Instead, it
  404. should refer to the full path name of the CD via the volume name of the
  405. disc (for example, MyDisk:Data/MyFile).  You should not refer to the
  406. device name (cd0:) since this may vary, either with more than one
  407. CD-ROM peripheral attached, or a different device name for a
  408. third-party drive.
  409.  
  410. If your title does refer to a volume name, be careful when
  411. pre-mastering the title.  Make sure you enter the correct volume name
  412. when running the ISO utility.  If another company does the
  413. pre-mastering for you, make sure they use the correct volume name.
  414.  
  415.  
  416. Conclusion
  417.  
  418. Full support for the A570 does require a certain amount of effort on
  419. behalf of the CDTV developer.  Many of these points are also relevant
  420. for those CDTV owners that expand their unit to be an Amiga.
  421.  
  422. Remember, you are not obliged to support all these features.  Many CDTV
  423. applications take over total control of the system, and are not
  424. designed to multitask.  There is nothing wrong with doing this, even if
  425. you want your title to run on the A570.  If you include Level One
  426. support, you can insist that your title be booted directly from the CD.
  427. It is better to have a title which runs perfectly on the CDTV than one
  428. which is awkward to use on both the CDTV and the A570.
  429.